import { createRouter,createWebHashHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/nav',
    name: 'nav',
    component: () => import(/* webpackChunkName: "login" */ '../views/Nav.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
  },
  {
    path: '/rankings',
    name: 'rankings',
    component: () => import(/* webpackChunkName: "rankings" */ '../views/Rankings.vue')
  },
  {
    path: '/question-type',
    name: 'question-type',
    component: () => import(/* webpackChunkName: "question-type" */ '../views/QuestionType.vue')
  },
  {
    path: '/question-detail',
    name: 'question-detail',
    component: () => import(/* webpackChunkName: "question-detail" */ '../views/QuestionDetail.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
